<template>
  <div class="not-found-page">
    <div class="not-found-container">
      <div class="error-content">
        <div class="error-number gradient-text">404</div>
        <h1 class="error-title">页面不存在</h1>
        <p class="error-description">抱歉，您访问的页面不存在或已被删除</p>
        
        <div class="error-actions">
          <el-button type="primary" @click="goHome" size="large">
            返回首页
          </el-button>
          <el-button @click="goBack" size="large">
            返回上页
          </el-button>
        </div>
      </div>
      
      <div class="error-illustration">
        <el-icon class="error-icon"><Warning /></el-icon>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { Warning } from '@element-plus/icons-vue'

const router = useRouter()

const goHome = () => {
  router.push('/')
}

const goBack = () => {
  router.go(-1)
}
</script>

<style scoped lang="scss">
.not-found-page {
  min-height: 100vh;
  background: linear-gradient(135deg, $secondary-color 0%, $bg-white 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: $spacing-lg;
}

.not-found-container {
  max-width: 600px;
  text-align: center;
  
  .error-content {
    .error-number {
      font-size: 120px;
      font-weight: bold;
      line-height: 1;
      margin-bottom: $spacing-lg;
    }
    
    .error-title {
      font-size: $font-size-xxl;
      color: $text-primary;
      margin-bottom: $spacing-md;
    }
    
    .error-description {
      font-size: $font-size-lg;
      color: $text-secondary;
      margin-bottom: $spacing-xl;
    }
    
    .error-actions {
      display: flex;
      gap: $spacing-md;
      justify-content: center;
    }
  }
  
  .error-illustration {
    margin-top: $spacing-xl;
    
    .error-icon {
      font-size: 80px;
      color: $text-light;
    }
  }
}

@media (max-width: $breakpoint-sm) {
  .error-content {
    .error-number {
      font-size: 80px;
    }
    
    .error-actions {
      flex-direction: column;
      align-items: center;
    }
  }
}
</style> 